import {
  INCREASE,
  DECREASE,
  GETDATA
} from './types'
import getters from './getters' // 得到当前的数据

// 初始数据（数据源）
const state = {
  count: 0
}

// 操作改变之后的数据
const mutations = {
  [INCREASE]: state => state.count++,
  [DECREASE]: state => state.count--,
  [GETDATA]: (state, data) => { console.log(data) }
}

export default {
  state,
  getters,
  mutations
}
